/*
 * Copyright (c) 2006, 2021, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

/**
 * <p>Project: javase - SellTicket
 * <p>Powered by webrx On 2021-12-24 09:29:01
 * <p>Created by IntelliJ IDEA
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class SellTicket {
    public static void main(String[] args) {


        //同步锁 this 是 ticket对象
        var ticket = new Ticket2(20);
        var t1 = new Thread(ticket, "东风路");
        var t2 = new Thread(ticket, "南阳路");
        var t3 = new Thread(ticket, "文化路");
        var t4 = new Thread(ticket, "瑞达路");
        t1.start();
        t2.start();
        t3.start();
        t4.start();
    }
}
